//1.导入路由
import { createRouter,createWebHashHistory } from "vue-router";

import Index from '../components/index.vue'
import Emp from '../components/emp.vue'
import Other from "../components/other.vue"
import { compile } from "vue";



//2.路由配置
const routes = [
    {
        path : "/",
        component : Index,
        children:[
            {
                path : "/emp",
                component : Emp
            },
            {
                path : "/other",
                component : Other
            }
        ]
    }
]

//3.创建路由
const router = createRouter({
    history:createWebHashHistory(),
    routes
})

//4.导出路由
export default router